package Basic;

import java.io.InputStream;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;

public class MyToolBar {
	ToolBar toolbar;
	Interface mainInterface;
	
	MyToolBar(Shell shell,Interface mainInterface){
		this.mainInterface=mainInterface;
	    toolbar = new ToolBar(shell,SWT.FLAT);
	}
	public ToolItem addToolItem(String imageFileName,String caption){
		
		ToolItem item1=new ToolItem(toolbar,SWT.PUSH);
		
	    Image im=new Image(mainInterface.getDisplay(),"image\\"+imageFileName);
	    item1.setImage(im);
	    item1.setToolTipText(caption);
	    
		return item1;
	}
	
}
